package com.easy.query.test.entity.school.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.school.SchoolTeacher;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.SQLNavigateColumn;
import com.easy.query.core.proxy.columns.SQLManyQueryable;
import com.easy.query.core.proxy.columns.types.SQLAnyTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class SchoolTeacherProxy extends AbstractProxyEntity<SchoolTeacherProxy, SchoolTeacher> {

    private static final Class<SchoolTeacher> entityClass = SchoolTeacher.class;

    public static final SchoolTeacherProxy TABLE = createTable().createEmpty();

    public static SchoolTeacherProxy createTable() {
        return new SchoolTeacherProxy();
    }

    public SchoolTeacherProxy() {
    }

    /**
     * {@link SchoolTeacher#getId}
     */
    public SQLStringTypeColumn<SchoolTeacherProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link SchoolTeacher#getName}
     */
    public SQLStringTypeColumn<SchoolTeacherProxy> name() {
        return getStringTypeColumn("name");
    }

    /**
     * {@link SchoolTeacher#getSchoolClasses}
     */
    public SQLManyQueryable<SchoolTeacherProxy, com.easy.query.test.entity.school.proxy.SchoolClassProxy, com.easy.query.test.entity.school.SchoolClass> schoolClasses() {
        return getNavigateMany("schoolClasses", new com.easy.query.test.entity.school.proxy.SchoolClassProxy());
    }


    @Override
    public Class<SchoolTeacher> getEntityClass() {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public SchoolTeacherProxyFetcher FETCHER = new SchoolTeacherProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class SchoolTeacherProxyFetcher extends AbstractFetcher<SchoolTeacherProxy, SchoolTeacher, SchoolTeacherProxyFetcher> {

        public SchoolTeacherProxyFetcher(SchoolTeacherProxy proxy, SchoolTeacherProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link SchoolTeacher#getId}
         */
        public SchoolTeacherProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link SchoolTeacher#getName}
         */
        public SchoolTeacherProxyFetcher name() {
            return add(getProxy().name());
        }


        @Override
        protected SchoolTeacherProxyFetcher createFetcher(SchoolTeacherProxy cp, AbstractFetcher<SchoolTeacherProxy, SchoolTeacher, SchoolTeacherProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new SchoolTeacherProxyFetcher(cp, this, sqlSelectExpression);
        }
    }

}
